package com.cl.pile.rule.filter;


public class InFilterOperation implements IFilterOperation{
    @Override
    public boolean filterMatch(Object value, String matchValue) {
        if (value == null || matchValue == null) {
            return false;
        }
        String val = String.valueOf(value);
        String[] matchValues = matchValue.split(",");
        for (String s: matchValues) {
            if (val.equals(s)) {
                return true;
            }
        }
        return false;
    }

    @Override
    public String filterName() {
        return "列表包含";
    }
}
